//
//  BIDCalendarViewController.h
//  TestCalendar
//
//  Created by mal on 14-1-10.
//  Copyright (c) 2014年 mal. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BIDBaseViewController.h"
@class EventKitController;

@interface BIDCalendarViewController : BIDBaseViewController<UICollectionViewDataSource, UICollectionViewDelegate, UITableViewDataSource, UITableViewDelegate>
@property (strong, nonatomic)EventKitController *eventKitController;

@property (strong, nonatomic)IBOutlet UIView *headerView;
//前一个月
@property (strong, nonatomic)IBOutlet UIButton *preBtn;
//后下一月
@property (strong, nonatomic)IBOutlet UIButton *nextBtn;
//显示当前日期
@property (strong, nonatomic)IBOutlet UILabel *dateLabel;

@property (strong, nonatomic)UICollectionView *calCollectionView;

@property (strong, nonatomic)IBOutlet UITableView *myTableView;
@property (strong, nonatomic)NSMutableArray *remindersArr;

@property (strong, nonatomic)NSMutableArray *dataSourceArr;

//当天的日期
@property (strong, nonatomic)NSDate *_todayDate;
//当前的日期
@property (strong, nonatomic)NSDate *_curDate;

//判断是否为闰年
- (BOOL)isLeapYear:(NSDate*)date;
//根据日期初始化数据源
- (void)initDataSource:(NSDate*)date1;
//根据date获得所在月份总天数
- (int)getDaysWithDate:(NSDate*)date;
//用来显示周几
- (void)initHeaderView;

//获取当前年月日周
- (NSArray*)getArrWithDate:(NSDate*)date;

- (IBAction)preBtnHandler:(id)sender;
- (IBAction)nextBtnHandler:(id)sender;

//添加事件
- (void)addCalEvent;

- (void)remindersPermissionGranted;
- (void)refreshView;
//获得mytableview的数据源
- (void)getDataArrForTableView;

@end
